<?php
/**
 * Each engineer has a duty to keep the code elegant
 * Created by wolffy.
 * Author @wolffy<13750088090@sina.cn>
 * Date: 2018/8/12
 * Time: 11:40
 */
namespace App\Repositories;

use App\Models\UserLevelProfit;

class UserLevelProfitRepository
{
    /**
     * @param $levelId
     * @param $profitType
     * @return mixed
     */
    public function byToProfitPercent($levelId, $profitType)
    {
        return UserLevelProfit::where([
            'level_id' => $levelId,
            'profit_type' => $profitType,
        ])->first();
    }
}